package com.billing.model.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.billing.model.entity.Comment;
import com.billing.model.entity.CommentAppBean;
import com.billing.model.entity.Consultation;
import com.billing.model.entity.ConsultationAppBean;
import com.billing.model.entity.Message;

/**
 * @author Administrator
 *
 */
public interface ConsultationDao {

	/**
	 * @param consultingtitle
	 * @param art
	 * @param organizationid
	 * @param currentPage
	 * @param pageSize
	 * @return
	 */
	public List<Consultation> getConsultationlist(
			@Param("consultingtitle") String consultingtitle,
			@Param("art") String art,
			@Param("organizationid") int organizationid,
			@Param("currentPage") int currentPage,
			@Param("pageSize") int pageSize);
	
	
	/**
	 * 根据登录用户ID获取对应的信息
	 * @param name
	 * @return
	 */
	//public List<ConsultationAppBean> selConsultationId(@Param("userid")String userid,@Param("startRow")int startRow,@Param("pageSize") int pageSize);
	public List<ConsultationAppBean> selConsultationId(@Param("startRow")int startRow,@Param("pageSize") int pageSize);

	
	/**
	 * 评论接口
	 * @param name
	 * @return
	 */
	public List<CommentAppBean> selcommentId(@Param("consid")String consid,@Param("startRow")int startRow,@Param("pageSize") int pageSize);
	
	public int CommentNum(@Param("consid")String consid);
	
	/**
	 * 根据登录用户ID获取对应的单个详细信息
	 * @param name
	 * @return
	 */
	//public Consultation selConsId(@Param("id")String id,@Param("userid")String userid);
	public Consultation selConsId(@Param("id")String id);
	
	/**
	 * @param name
	 * @return
	 */
	public Comment CommentById(@Param("id")int id,@Param("consid")int consid);
	
	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @return
	 */
	public int InterfaceNum();
	
	/**
	 * @param title
	 * @param cont
	 * @param organizationid
	 * @return
	 */
	public int selectConsuNum(@Param("consultingtitle") String consultingtitle,
			@Param("art") String art,
			@Param("organizationid") int organizationid);
	
	/**
	 * 根据ID获取信息
	 * @param name
	 * @return
	 */
	public Consultation selectConsubyId(@Param("id") String id);
	
	
	/**
	 * 新增咨询信息
	 * 
	 * @param shift
	 * @return
	 */
	public int insertCons(Consultation consultation);
	
	/**
	 * 新增评论信息
	 * 
	 * @param shift
	 * @return
	 */
	public int insertComment(Comment comment);
	
	
	/**
	 * 修改咨询信息
	 * 
	 * @param attendance
	 * @return
	 */
	public int updateCons(Consultation consultation);
	
	public int updatereadtype(Consultation consultation);
	
	/**
	 * 删除咨询信息
	 * 
	 * @param coding
	 * @return
	 */
	public int deleteConsByid(@Param("id") int id);
	
	public int insertpath(Consultation consultation);
}
